package com.bc.web.controller.merch;


import java.util.List;

import com.bc.web.model.Account;
import com.bc.web.model.MerchUser;
import com.fs.common.extend.FSController;

public class AccountController extends FSController{
	
	public void search(){
		MerchUser merchUser = (MerchUser) getSession().getAttribute("merchUser");
		Object[] accountNo = {merchUser.getMerchCode()};
		List<Account> accountList = Account.dao.selectByAccountNo(accountNo);
		for (Account item : accountList) {
			item.setBalance(Long.valueOf(item.get("sumBalance").toString()));
			item.setD0Balance(Long.valueOf(item.get("sumD0Balance").toString()));
		}
		setAttr("accountList", accountList);
		render("account/accountList.html");
	}

}
